package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysProjectInfoMapper;
import com.ruoyi.system.domain.SysProjectInfo;
import com.ruoyi.system.service.ISysProjectInfoService;

/**
 * 项目申报Service业务层处理
 * 
 * @author riddou
 * @date 2022-04-11
 */
@Service
public class SysProjectInfoServiceImpl implements ISysProjectInfoService 
{
    @Autowired
    private SysProjectInfoMapper sysProjectInfoMapper;

    /**
     * 查询项目申报
     * 
     * @param projectId 项目申报主键
     * @return 项目申报
     */
    @Override
    public SysProjectInfo selectSysProjectInfoByProjectId(Long projectId)
    {
        return sysProjectInfoMapper.selectSysProjectInfoByProjectId(projectId);
    }

    /**
     * 查询项目申报列表
     * 
     * @param sysProjectInfo 项目申报
     * @return 项目申报
     */
    @Override
    public List<SysProjectInfo> selectSysProjectInfoList(SysProjectInfo sysProjectInfo)
    {
        return sysProjectInfoMapper.selectSysProjectInfoList(sysProjectInfo);
    }

    /**
     * 新增项目申报
     * 
     * @param sysProjectInfo 项目申报
     * @return 结果
     */
    @Override
    public int insertSysProjectInfo(SysProjectInfo sysProjectInfo)
    {
        sysProjectInfo.setCreateTime(DateUtils.getNowDate());
        return sysProjectInfoMapper.insertSysProjectInfo(sysProjectInfo);
    }

    /**
     * 修改项目申报
     * 
     * @param sysProjectInfo 项目申报
     * @return 结果
     */
    @Override
    public int updateSysProjectInfo(SysProjectInfo sysProjectInfo)
    {
        sysProjectInfo.setUpdateTime(DateUtils.getNowDate());
        return sysProjectInfoMapper.updateSysProjectInfo(sysProjectInfo);
    }

    /**
     * 批量删除项目申报
     * 
     * @param projectIds 需要删除的项目申报主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectInfoByProjectIds(Long[] projectIds)
    {
        return sysProjectInfoMapper.deleteSysProjectInfoByProjectIds(projectIds);
    }

    /**
     * 删除项目申报信息
     * 
     * @param projectId 项目申报主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectInfoByProjectId(Long projectId)
    {
        return sysProjectInfoMapper.deleteSysProjectInfoByProjectId(projectId);
    }
}
